#pragma once
#include "stdafx.h"
#include "CConstantBuffer.h"
#include "CVertexShader.h"
#include "CPixelShader.h"
#include "CVertexBuffer.h"
#include "CIndexBuffer.h"

class CGraphics
{
public:
	CGraphics(void);
	~CGraphics(void);

	HRESULT InitDevice( HWND hWnd, BOOL windowed );

	ID3D11Device*           Getpd3dDevice() { return g_pd3dDevice; }
	ID3D11DeviceContext*    GetpImmediateContext() { return g_pImmediateContext; }
	IDXGISwapChain*         GetpSwapChain() { return g_pSwapChain; }
	ID3D11RenderTargetView* GetpRenderTargetView() { return g_pRenderTargetView; }
	ID3D11DepthStencilView* GetpDepthStencilView() { return g_pDepthStencilView; }

	void					CleanupDevice();
	void					Render();

private:
	D3D_DRIVER_TYPE         g_driverType;
	D3D_FEATURE_LEVEL       g_featureLevel;
	ID3D11Device*           g_pd3dDevice;
	ID3D11DeviceContext*    g_pImmediateContext;
	IDXGISwapChain*         g_pSwapChain;
	ID3D11RenderTargetView* g_pRenderTargetView;
	ID3D11Texture2D*        g_pDepthStencil;
	ID3D11DepthStencilView* g_pDepthStencilView;
};

